<?php
namespace Events\Form;

use Zend\Form\Form;

class AddSession2Event extends Form
{

    public function __construct($name = null)
    {
        parent::__construct('event');
        $this->setAttribute('method', 'post');
        $this->setAttribute('class', 'form-horizontal');
        $this->setAttribute('id', 'add_sessionform');
        $this->setInputFilter(new AddSession2EventFilter());
        
        $this->add(array(
            'name' => 'ID',
            'type' => 'Hidden',
            array(
                'default' => '2'
                )
        ));
        
        $this->add(array(
            'name' => 'SESSIONS',
            'options' => array(
                'label' => 'Session',
                'empty_option' => '--select a Session--',
                'disable_inarray_validator' => true
            ),
            'type' => 'Select',
            'attributes' => array(
                'class' => 'form-control',
                'style' => 'width:15em'
            )
        ));
        
        $this->add(array(
            'name' => 'DURATION',
            'options' => array(
                'label' => 'Duration'
            ),
            'type' => 'Text',
            'attributes' => array(
                'class' => 'form-control',
                'style' => 'width:15em',
                'disabled' => 'disabled',
                'id'=>'SESSION_DURATION'
            )
        ));
        
        $this->add(array(

            'name' => 'DATE',
            'type' => 'text',
            'options' => array(
                'label' => 'Date',
                'format' => 'Y-m-d'
            ),
            'attributes' => array(
                'class' => 'form-control',
                'id' => 'event_date',
                'disabled' => 'disabled',
                'style' => 'width:15em'
            )

        ));       

    
        $this->add(array(
            'name' => 'STARTING_TIME',
            'options' => array(
                'label' => 'Starting Time'
            ),
            'type' => 'Text',
            'attributes' => array(
                'class' => 'form-control',
                'style' => 'width:15em',
                'id'=>'SESSION_STARTING_TIME'
            )
        ));        
       
        
        $this->add(array(
            'name' => 'BTNADD',
            'options' => array(
                'label' => 'Add'
            ),
            'attributes' => array(
                'value' => 'Add',
                'class' => 'btn btn-default',
                'id' => 'add_sessionbtn'
            ),
            'type' => 'button'
        ));
        
        $this->add(array(
            'name' => 'BTNCLOSE',
            'options' => array(
                'label' => 'Close'
            ),
            'attributes' => array(
                'class' => 'btn btn-default',
                'id' => 'add_sessionformclosebtn'
            ),
            'type' => 'button',
        ));
        
        // We could also define the input filter here, or
        // lazy-create it in the getInputFilter() method.
    }
}